Electronic ballasts are used to provide power to gas discharge lamps such as fluorescent lights. These ballasts often sense the voltage applied to the lamp to monitor the functioning of the lamp and ballast. To sense the lamp voltage with a microcontroller, prior art ballasts such as set forth in U.S. Pat. No. 5,925,990, sample the lamp voltage through a resistor connected in series with a resonant capacitor. The voltage across the resistor represents the current in a resonant inductor, which is in turn proportional to the voltage across the resonant capacitor. However, in order to fully utilize the resolution of the A/D converter of the microcontroller, the voltage drop across the resistor needs to be relatively high. As a result, more than 2 watts of power are typically consumed at the output of the resonant inverter which increases the required input power to the ballast. Therefore, since efficiency is very important in modern lighting designs, an improved method and apparatus for sensing lamp voltage that consumes less power is needed.
In some prior art ballasts, the voltage on the lamp voltage sensing resistor is also used to control the open circuit voltage during striking when no lamp is connected. To accomplish this, the pulse width of one or both switches of the half bridge is typically controlled. Controlling the pulse width controls the open circuit voltage indirectly by using inductor current to control the voltage on the capacitor. As a result, large open circuit voltage variations often result when external connections to the fixture, such as cables, add extra capacitance. In ballast implementations that can afford to use a large resonant capacitor and a small inductor, the open circuit voltage variation problem is generally not significant. However, potentially damaging hard switching or capacitive mode switching is often observed with this type of prior art open circuit voltage controlled ballast. Furthermore, the use of a large resonant capacitor makes the resonant tank difficult to design. As a result, these types of ballasts suffer from more conduction losses and/or hard switching during the striking of the lamp than do typical ballasts. Conduction losses and hard switching are undesirable in that they may ultimately cause the ballast to fail. A large resonant capacitor, with a striking voltage of two lamps across it, stores a substantial amount of energy. When the striking attempt occurs when there is no load, the striking energy is transferred to the resonant inductor and can saturate the inductor. The result is undesirable hard switching occurring during the striking. Even though a MOSFET can survive the high stress transients in ballasts with a 460V bulk voltage, hard switching is undesirable and should be avoided if possible since it may result in damage. Furthermore, for some types of ballasts, it is critically important to avoid hard switching due to their particular susceptibility to damage from transients. Thus, in many of the prior art ballasts, the resonant capacitor value is minimized and a cable compensation circuit is utilized to control the open circuit voltage such that it is constant with various lengths of connecting cables having varying amounts of capacitance. However, these circuits are often complex and decrease the efficiency while increasing the cost of the ballast. Therefore, an improved method and apparatus for sensing and controlling the open circuit voltage of a ballast is needed.